import fasttext
import sys


if __name__ == '__main__':
    out_model = '/data/data/new_class1_ft_title.bin'
    # out_model = sys.argv[1]
    # test_file = sys.argv[2]
    model = fasttext.load_model(out_model, label_prefix='__label__')
    out = model.predict_proba(['吉利 旗舰 SUV ， 配 沃尔沃 动力 ， 值得 买 吗 ？'], k=3)

    # for l in open(test_file):
    #     d = l.strip().split('\t', 1)
    #
    #     target = d[0].replace('__label__', '')


    print(out)
